<html>
<!--
Copyright 2011 The Closure Library Authors. All Rights Reserved.

Use of this source code is governed by the Apache License, Version 2.0.
See the COPYING file for details.
-->
<head>
<title>Closure Unit Tests - goog.net.IframeIo (with different base URL)</title>
<script>
// We use a different base to reproduce the conditions of crbug.com/66987
var href = window.location.href;
var newHref = href.replace(/net.*/, '');
document.write('<base href="' + newHref + '">');

var baseScript = 'base.js';
document.write('<script src="' + baseScript + '"><\/script>');
</script>
<script>
  goog.require('goog.net.IframeIo');
  goog.require('goog.testing.AsyncTestCase');
  goog.require('goog.testing.jsunit');
</script>
</head>
<body>
<script>

var asyncTestCase = goog.testing.AsyncTestCase.createAndInstall();

function testDifferentBaseUri() {
  var io = new goog.net.IframeIo();
  goog.events.listen(io, goog.net.EventType.COMPLETE,
      function() {
        assertNotEquals('File should have expected content.',
            -1, io.getResponseText().indexOf('just a file'));
        asyncTestCase.continueTesting();
      });
  io.send('net/iframeio_different_base_test.data');
  asyncTestCase.waitForAsync('Waiting for iframeIo respons.');
}

</script>
</body>
</html>
